{% extends 'mathtesthome.html' %}
{% block body %}
<div class="main-content container">


    <div class="row">
        <div class="col-md-12">
            <div class="panel panel-default">
                <div class="panel-heading ">{{title}}

                </div>

                <div class="panel-body pl-sm-5">
                    <label class="col-12 col-sm-4 col-form-label text-sm-center">题目</label>
                    <label class="col-12 col-sm-2 col-form-label text-sm-center">错误次数</label>


                    {%for question in object_list%}

                    <div class="form-group row">
                        <label class="col-12 col-sm-4 col-form-label"><a
                                href="{% url 'mathtest:mistakedetail' question.id %}">{{question}}</a></label>

                        <label class="col-12 col-sm-2 col-form-label text-sm-right"><a
                                href="#">{{question.wrongcount}}</a></label>
                        <label class="col-12 col-sm-1 col-form-label text-sm-right"><a
                                href="{% url 'mathtest:mistakedetail' question.id %}">详情</a></label>

                        {%if question.archive%}

                         <label class="col-12 col-sm-1 col-form-label text-sm-right"><a
                                href="{%url 'mathtest:mistakearchiverestore' question.id%}">还原</a></label>
                        {%else%}
                        <label class="col-12 col-sm-1 col-form-label text-sm-right"><a
                                href="{%url 'mathtest:mistakearchive' question.id%}">归档</a></label>
                        {%endif%}


                    </div>

                    {%endfor%}


                </div>

            </div>
        </div>
    </div>
</div>

{% endblock %}